package org.zachary.agent.domain.repository;

import org.zachary.agent.domain.aggregate_model.token.DeviceId;

import org.zachary.agent.domain.aggregate_model.token.RedisTokenEntity;
import org.zachary.agent.domain.aggregate_model.token.Token;

import java.util.Optional;

public interface TokenRepository {
    void save(Token token, String userId, DeviceId deviceId);    // 存储Token对
    Optional<RedisTokenEntity> findByUserIdAndDeviceId(String userId, DeviceId deviceId);
    void invalidate(String userId,DeviceId deviceId);
}
